<include file="public@header" />
</head>
<body>
	<div class="wrap">
		<ul class="nav nav-tabs">
			<li><a href="{:url('index')}">生产列表</a></li>
			<li class="active"><a href="">生产</a></li>
		</ul>
		<form method="post" class="form-horizontal js-ajax-form margin-top-20" action="">
			<div class="form-group">
				<label for="input-name" class="col-sm-2 control-label"><span class="form-required">*</span>公司名称</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" id="input-name" required name="name">
				</div>
			</div>
			<div class="form-group">
				<label for="input-mid" class="col-sm-2 control-label">原材料选择</label>
				<div class="col-md-6 col-sm-10">
					<input class="form-control" type="text" value=""
						   placeholder="请选择原材料" onclick="doSelectLayer(this,material);" data-has_null="true"
						   data-url="{:url('material/check')}" data-id="input-mid" name="layer_temp[1]"
						   readonly/>
					<input class="form-control" type="hidden" value="" name="mid"
						   id="input-mid"/>
				</div>
			</div>
			<div class="form-group">
				<label for="input-mcost" class="col-sm-2 control-label">原材料</label>
				<div class="col-md-6 col-sm-10">
					<input type="number" class="form-control" id="input-mcost" name="mcost" readonly>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">辅助材料</label>
				<div class="col-md-6 col-sm-10">
					<volist name="types" id="vo">
						<div class="input-group">
							<div class="input-group-addon">{$vo.name}</div>
							<input type="number" class="form-control" name="cost[3][{$vo.id}]">
						</div>
					</volist>
				</div>
			</div>
			<div class="form-group">
				<label for="input-manpower" class="col-sm-2 control-label">人工</label>
				<div class="col-md-6 col-sm-10">
					<input type="number" class="form-control" id="input-manpower" name="manpower">
				</div>
			</div>
			<div class="form-group">
				<label for="input-apportion" class="col-sm-2 control-label">公摊</label>
				<div class="col-md-6 col-sm-10">
					<input type="number" class="form-control" id="input-apportion" name="apportion">
				</div>
			</div>
			<div class="form-group">
				<label for="input-reg_time" class="col-sm-2 control-label"><span class="form-required">*</span>注册时间</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control js-bootstrap-date" id="input-reg_time" required name="reg_time">
				</div>
			</div>
			<div class="form-group">
				<label for="input-end_time" class="col-sm-2 control-label"><span class="form-required">*</span>到期时间</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control js-bootstrap-date" id="input-end_time" required name="end_time">
				</div>
			</div>
			<div class="form-group">
				<label for="input-corporation" class="col-sm-2 control-label"><span class="form-required">*</span>法人</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" id="input-corporation" required name="corporation">
				</div>
			</div>
			<div class="form-group">
				<label for="input-supervisor" class="col-sm-2 control-label"><span class="form-required">*</span>监事</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" id="input-supervisor" required name="supervisor">
				</div>
			</div>
			<div class="form-group">
				<label for="input-director" class="col-sm-2 control-label"><span class="form-required">*</span>董事</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" id="input-director" required name="director">
				</div>
			</div>
			<div class="form-group">
				<label for="input-accountant" class="col-sm-2 control-label"><span class="form-required">*</span>财务/办税人员</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" id="input-accountant" required name="accountant">
				</div>
			</div>
			<div class="form-group">
				<label for="input-area" class="col-sm-2 control-label"><span class="form-required">*</span>注册地</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" id="input-area" required name="area">
				</div>
			</div>
			<div class="form-group">
				<label for="input-registered_capital" class="col-sm-2 control-label"><span class="form-required">*</span>注册资金</label>
				<div class="col-md-6 col-sm-10">
					<input type="number" class="form-control" id="input-registered_capital" required name="registered_capital">
				</div>
			</div>
			<div class="form-group">
				<label for="input-reg_type" class="col-sm-2 control-label"><span class="form-required">*</span>注册类型</label>
				<div class="col-md-6 col-sm-10">
					<label class="radio-inline">
						<input type="radio" name="reg_type" id="input-reg_type1" value="1"> 内资
					</label>
					<label class="radio-inline">
						<input type="radio" name="reg_type" id="input-reg_type2" value="2"> 外资
					</label>
					<label class="radio-inline">
						<input type="radio" name="reg_type" id="input-reg_type3" value="3"> 合资
					</label>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-offset-2 col-sm-10">
					<button type="submit" class="btn btn-primary js-ajax-submit">添加</button>
					<a class="btn btn-default" href="javascript:history.back(-1);">返回</a>
				</div>
			</div>
		</form>
	</div>
<script src="__STATIC__/js/admin.js"></script>
<script>
	function material(data) {
		console.log(data);
        $('#input-mcost').val(data.cost);
        $("input:radio[name=reg_type][value="+data.type+"]").attr("checked",true);
    }
</script>
</body>
</html>